package com.zhenxiang.juc.function;

import java.util.function.Consumer;

/**
 * @Author : James
 * @Create : 2021-12-27-15:58
 * @Description :
 * Consumer 消费型接口，只有参数输入，没有返回值
 *
 *
 */
public class Demo03 {

    public static void main(String[] args) {

     /*   Consumer<String> consumer = new Consumer<String>() {
            @Override
            public void accept(String s) {
                System.out.println(s);
            }
        };*/

        Consumer<String> consumer = (str) -> {
            System.out.println();
        };
        consumer.accept("aaa");
    }
}
